package cn.saddyfire.pattern.command.jdk;



/**
 * @author Dee
 * @date 2024/2/20
 * <p>Description:命令模式jdk源码测试
 */
public class Test {
    public static void main(String[] args) {
        //定义接收者
        Receiver receiver = new Receiver();
        //Runnable充当命令角色
        TurnOffThread turnOffThread = new TurnOffThread(receiver);
        //Thread充当调用者
        Thread thread = new Thread(turnOffThread);
        //start是其方法
        thread.start();
    }
}
